<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	

<h:head></h:head>


<body>

	<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
		template="./../WEB-INF/Facelets/mainTemplate.xhtml">

		<ui:define name="content">
		
		<div id="content">
		
			
			<h:form id="form" >	
			
			<script>  
			
            	function mascara(o, f) {  
	              v_obj = o;  
	              v_fun = f;  
	              setTimeout("execmascara()", 1);  
	            }  
	  
	            function execmascara() {  
	              v_obj.value = v_fun(v_obj.value);  
	            }  
	  
	         	function valor(v) {  
		        v = v.replace(/\D/g, "");  
		        v = v.replace(/[0-9]{15}/, "invÃ¡lido");  
		        v = v.replace(/(\d{1})(\d{11})$/, "$1.$2"); // coloca ponto antes dos  
		        // Ãºltimos 11 digitos  
		        v = v.replace(/(\d{1})(\d{8})$/, "$1.$2"); // coloca ponto antes dos  
		        // Ãºltimos 8 digitos  
		        v = v.replace(/(\d{1})(\d{5})$/, "$1.$2"); // coloca ponto antes dos  
		        // Ãºltimos 5 digitos  
		        v = v.replace(/(\d{1})(\d{1,2})$/, "$1,$2"); // coloca virgula antes dos  
		        // Ãºltimos 2 digitos  
		        return v;  
				}  
	  
 	  		</script>		
			

				<p:panel header="Manutenções" style="font-size:25px;">


					<h:panelGrid id="gridFormMan" columns="4" cellpadding="5"
						style="margin-bottom:5px; font-size:12px; font-weight:bold;">

						<h:outputLabel id="ve" value="Veículo*: " />
						<p:inputText size="9" maxlength="10"
							value="#{personBean.firstname}" />

						<h:outputLabel value="KM*: " />
						<p:inputText size="9" maxlength="10"
							value="#{personBean.firstname}" />

						<h:outputLabel value="Fornecedor*: " />
						<p:inputText size="19" maxlength="20"
							value="#{personBean.firstname}" />


						<h:outputLabel value="Produto*: " />
						<p:inputText size="19" maxlength="20"
							value="#{personBean.firstname}" />

						<h:outputLabel value="Quantidade*: " />
						<p:inputText size="19" maxlength="20"
							value="#{personBean.firstname}" />

						<h:outputLabel value="Valor do Produto*: " />
						<p:inputText size="9" maxlength="10"
							value="#{personBean.firstname}" />

						<h:outputLabel value="Fornecedor de Mão de Obra*: " />
						<p:inputText size="19" maxlength="20"
							value="#{personBean.firstname}" />

						<h:outputLabel value="Valor da Mão de Obra*: " />
						<p:inputText  size="9" maxlength="10" value="#{personBean.firstname}" 
						onkeypress="mascara(this, valor);" />					
						
						<h:outputLabel value="Valor Total*: " />
						<p:inputText  size="9" maxlength="10"
							value="#{personBean.firstname}" />

						<h:outputText value="Data: " />
						<p:inputMask size="8" value="#{maskController.date}"
							id="datepicker" />

						<h:outputLabel value="Observações: " />
						<p:inputTextarea size="29" maxlength="30"
							value="#{personBean.firstname}" />


					</h:panelGrid>
					<!-- fim da grid gridFormMan -->

					<h:panelGrid id="gridBotoesManu" columns="2" cellpadding="3"
						style="margin-bottom:5px; font-size:12px; font-weight:bold;">
						<p:commandButton value="Limpar" type="reset" />
						<p:commandButton value="Cadastrar" type="submit" />
					</h:panelGrid>
					<!-- fim da grid gridBotoesMan -->

				</p:panel>
				<!-- fim do panel Cadastro de manutencoes -->

			</h:form>
			<!-- fim do formulario -->

		</div>
		<!-- fim da div content -->


		</ui:define>



	</ui:composition>

</body>
</html>
